function [P_hat,Select] = func_Logit(Response,X,n,p,lambda_BCFVH,K)

    P_hat = zeros(n,1); 

    for k=1:K    
        Psi_phi = max(eps,sqrt(mean((repmat((Response-P_hat),[1,p]).*X).^2,1)));
        [B,FitInfo] = lassoglm(X/diag(Psi_phi),Response,'binomial','Link','logit','Lambda',lambda_BCFVH/n,'Standardize',0);                    
        P_hat = 1-1./(1+exp(FitInfo.Intercept+(X/diag(Psi_phi))*B));            
    end
                    
    Select = B~=0;

end